package com.ss.android.article.lite.activity;

import android.content.Context;

import com.bytedance.common.utility.b.ThreadPlus;
import com.ss.android.article.base.app.RequestValidator;
import com.ss.android.article.base.feature.category.a.CategoryManager;
import com.ss.android.article.base.feature.feed.a.CategoryInfo;
import com.ss.android.article.base.feature.feed.a.FeedDataProvider;
import com.ss.android.article.base.feature.feed.a.FeedRefreshFromInfo;
import com.ss.android.common.util.json.JsonUtil;

final class a extends ThreadPlus {
    private final SplashActivity a;

    a(SplashActivity arg1, String arg2) {
        super(arg2);
        this.a = arg1;
    }

    public final void run() {
        CategoryInfo v0_3;
        SplashActivity v0 = this.a;
        v0.j();
        if (!SplashActivity.c) {
            SplashActivity.c = true;
        }

        CategoryManager.getInstance(((Context) v0));
        com.ss.android.article.base.feature.feed.a.a v0_1 = com.ss.android.article.base.feature.feed.a.a.a();
        if ((v0_1.c) && v0_1.b.size() == 0) {
            RequestValidator.a();
            JsonUtil.setJsonInstanceFactory(com.ss.android.article.base.feature.app.aa.a());
            String[] v3 = com.ss.android.article.base.feature.feed.a.a.a;
            int v2;
            for (v2 = 0; v2 <= 0; ++v2) {
                String v4 = v3[0];
                FeedDataProvider v5 = new FeedDataProvider();
                int v0_2 = -1;
                switch (v4.hashCode()) {
                    case 1226178913: {
                        if (v4.equals("__all__")) {
                            v0_2 = 0;
                        }

                        break;
                    }
                }

                switch (v0_2) {
                    case 0: {
                        v0_3 = new CategoryInfo("__all__");
                        v0_3.mCategoryCity = "__all__";
                        v0_3.l = 1;
                        break;
                    }
                    default: {
                        v0_3 = new CategoryInfo(v4);
                        break;
                    }
                }

                v5.a(v0_3);
                com.ss.android.article.base.feature.feed.a.a.a().b.put(v4, v5);
                if (!((Boolean) v5.d.get()).booleanValue()) {
                    v5.s = true;
                    FeedRefreshFromInfo refreshFromInfo = FeedRefreshFromInfo.create(0, "");
                    refreshFromInfo.c = true;
                    v5.a(refreshFromInfo, false);
                }
            }
        }
    }
}

